package com.hd.trans.extension

import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

/**
 * @author       qianjujun
 * @email        qianjujun@163.com
 * @createTime  2021/1/22 19:30
 * @describe
 */



suspend fun <T> ioExecute(func: suspend () -> T):T = withContext(Dispatchers.Default) {
    func.invoke()
}